package com.shijiu.common;

import lombok.AllArgsConstructor;
import lombok.Data;
/**
 * @Author xlj
 * @Date Created in  2023/3/18 14:30
 * @DESCRIPTION:
 * @Version V1.0
 */
@Data
@AllArgsConstructor
public class Result {

    private boolean success;

    private int code;

    private String message;

    private Object data;


    public static Result success(Object data){
        return new Result(true,200,"success",data);
    }

    public static Result fail(int code, String msg){
        return new Result(false,code,msg,null);
    }
}